package com.qujia.station.service;


import com.qujia.station.domain.NonOilCategory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * (NonOilCategory)表服务接口
 *
 * @author makejava
 * @since 2023-08-14 17:29:05
 */
public interface INonOilCategoryService {

    /**
     * 通过ID查询单条数据
     *
     * @param categoryId 主键
     * @return 实例对象
     */
    NonOilCategory queryById(Long categoryId);


    String queryCategoryName(Long categoryId,List<NonOilCategory> list);

    List<Long> getChildIds(Long categoryId);

    /**
     * 查询列表
     *
     * @param nonOilCategory 筛选条件
     * @return 查询结果
     */
    NonOilCategory getNonOilCategoryTree(NonOilCategory nonOilCategory);

    /**
     * 新增数据
     *
     * @param nonOilCategory 实例对象
     * @return 实例对象
     */
    int insertCategory(NonOilCategory nonOilCategory);

    /**
     * 修改数据
     *
     * @param nonOilCategory 实例对象
     * @return 实例对象
     */
    int update(NonOilCategory nonOilCategory);

    /**
     * 通过主键删除数据
     *
     * @param categoryId 主键
     * @return 是否成功
     */
    int deleteById(Long categoryId);

    int delete(List<Long> categoryIds);

    List<NonOilCategory> selectAll(NonOilCategory nonOilCategory);

    NonOilCategory getNonOilCategoryTreeAndCommodity(NonOilCategory nonOilCategory);
}
